#ifndef SLIDE_UP_H_
#define  SLIDE_UP_H_

#include "Effect.h"

namespace JDL
{
  class SlideUp : public Effect
  {
  public:
    SlideUp(Drawable *obj, int speed, bool repeat = false);
    virtual ~SlideUp();
    virtual void	Do(Drawable *obj)
    {
      if (_zone.h > 0)
	_zone.h -= _speed;
      else if (_zone.h == 0 && _repeat == true)
	_zone.h = _size.h;
      obj->SetSubRect(_zone.x, _zone.y, _zone.w, _zone.h);
    }
  private:
    SDL_Rect	_size;
    SDL_Rect	_zone;
    int		_speed;
  };
}

#endif
